package com.gec.zhs.entity.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gec.zhs.entity.enums.DateTimePatternEnum;
import com.gec.zhs.utils.DateUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * @author zhs
 * @version 1.0
 * @date 2025-01-06
 * @description 用户视频序列归档
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserVideoSeries implements Serializable {


    /**
     * 列表ID
     */
    private Integer seriesId;

    /**
     * 列表名称
     */
    private String seriesName;

    /**
     * 描述
     */
    private String seriesDescription;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private String cover;

    /**
     * 专题下的视频
     */
    private List<VideoInfo> videoInfoList;



    @Override
    public String toString() {
        return "列表ID:" + (seriesId == null ? "空" : seriesId) + "，列表名称:" + (seriesName == null ? "空" : seriesName) + "，描述:" + (seriesDescription == null ? "空" : seriesDescription) + "，用户ID:" + (userId == null ? "空" : userId) + "，排序:" + (sort == null ? "空" : sort) + "，更新时间:" + (updateTime == null ? "空" : DateUtil.format(
                updateTime,
                DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()));
    }
}
